import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/member/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/auth/member/logout',
    method: 'post'
  })
}

export function changePassword(data) {
  return request({
    url: '/auth/changePassword',
    method: 'post',
    data
  })
}

export function getUserAll(params) {
  return request({
    url: '/user/getUserAll',
    method: 'get',
    params
  })
}

export function addUser(data) {
  return request({
    url: '/user/addUser',
    method: 'post',
    data
  })
}

export function updataUser(data) {
  return request({
    url: '/user/updataUser',
    method: 'post',
    data
  })
}